package com.example.communist_app_api.controller.uniapp;


import com.example.communist_app_api.db.pojoDto.CarouselMap;
import com.example.communist_app_api.service.ArticleService;
import com.example.communist_app_api.service.UserService;
import com.example.communist_app_api.util.JwtUtils;
import com.example.communist_app_api.util.R;
import com.example.communist_app_api.vo.web.req.CarouselMapReq;
import io.jsonwebtoken.Claims;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping("/uniApp/CarouselMap/")
@Api("轮播图控制器")
public class UiAppCarouselMapController {

    @Autowired
    private ArticleService articleService;

    @Autowired
    private UserService userService;

    @GetMapping("getCarouselMap")
    @ApiOperation("获取轮播图列表")
    public R getCarouselMap(){
        List<CarouselMap> carouselMaps = articleService.getCarouselMap();
        return R.ok().put("carouselMaps",carouselMaps);
    }
}
